<?php 
defined('IN_TS') or die('Access Denied.');

include 'userinfo.php';

$page = isset($_GET['page']) ? intval($_GET['page']) : '1';
$url = tsUrl('user','weibo',array('id'=>$strUser['userid'],'page'=>''));
$lstart = $page*15-15;

$arrWeibo = $new['user']->findAll('weibo',array(
	'userid'=>$strUser['userid'],
),'addtime desc',null,$lstart.',15');
foreach($arrWeibo as $key=>$item){
	$arrWeibo[$key]['user'] = aac('user')->getOneUser($item['userid']);
	$arrWeibo[$key]['content'] = tsDecode($item['content']);
}

$weiboNum = $new['user']->findCount('weibo',array(
	'userid'=>$strUser['userid']
));
$pageUrl = pagination($weiboNum, 15, $page, $url);

$title = $strUser['username'].'的动态';
include template('weibo');